513822e268e2bb50faa4f64cb2e1e6b2cc7adfbf,battlegear mod src/minecraft/mods/battlegear2/client/gui/controls/GuiColourPicker.java,GuiColourPicker,drawButton,#Minecraft#number#number#,176

Before Change


    	if(visible){
	        GL11.glColor3f(1,1,1);
	
	        GL11.glPushMatrix();
	
	        //Draw the saturation / brightness square
	        sb_buffer.updateDynamicTexture();
	        this.drawTexturedModalRect(sb_start_x, sb_start_y, 48, 48, 0, 0, 1, 1);
	
	        //Draw the hue square
	        hue_buffer.updateDynamicTexture();
	        this.drawTexturedModalRect(hue_start_x, sb_start_y, 12, 48, 0, 0, 1, 1);
	
	        if(isSwitchOn(ALPHA_SELECTION)){
	            background_buffer.updateDynamicTexture();
	            this.drawTexturedModalRect(alpha_start_x, sb_start_y, 12, 48, 0, 0, 2, 8);
	
	            this.drawGradientRect(alpha_start_x, sb_start_y, alpha_start_x+12, sb_start_y+48, selectedRGB | 0xFF000000, selectedRGB & 0x00FFFFFF);
	        }
	
	        if(isSwitchOn(DEFAULT_COLOURS)){
	            default_colours.updateDynamicTexture();
	            this.drawTexturedModalRect(xPosition, yPosition, 48, 12, 0, 0, 1, 1);
	        }
	
	        if(isSwitchOn(COLOUR_DISPLAY)){
	            background_buffer.updateDynamicTexture();
	            this.drawTexturedModalRect(sb_start_x, sb_start_y+52, 48, 12, 0, 0, 8, 2);
	
	            drawRect(sb_start_x, sb_start_y+52, sb_start_x+48, sb_start_y+64, selectedRGB);
	            GL11.glColor3f(1,1,1);
	        }
	
	        GL11.glPushMatrix();
	        GL11.glColor3f(1,1,1);
	
	        GL11.glEnable(GL11.GL_BLEND);
	        GL11.glBlendFunc(GL11.GL_ONE_MINUS_DST_COLOR, GL11.GL_ZERO);
	        //Saturation Line (Horiz)
	        drawRect2(sb_start_x, sb_start_y + (int)((1-selectedHSB[1]) * 48),sb_start_x+48, sb_start_y + (int)((1-selectedHSB[1]) * 48)+1, 0xFFFFFFFF);
	
	        //Brightness Line (Vertical)
	        drawRect2(sb_start_x+ (int)((selectedHSB[2]) * 48), sb_start_y ,sb_start_x+(int)((selectedHSB[2]) * 48)+1, sb_start_y + 48, 0xFFFFFFFF);
	
	        //Hue Line
	        drawRect2(hue_start_x, sb_start_y + (int)(selectedHSB[0] * 48), hue_start_x+12, sb_start_y + (int)(selectedHSB[0] * 48)+1, 0xFFFFFFFF);
	        
	        //Alpha line
	        if(isSwitchOn(ALPHA_SELECTION)){
	        	drawRect2(alpha_start_x, sb_start_y + (int)((1-selected_alpha) * 48), alpha_start_x+12, sb_start_y + (int)((1-selected_alpha) * 48)+1, 0xFFFFFFFF);
	        }
	        
	        GL11.glDisable(GL11.GL_BLEND);
	        GL11.glPopMatrix();
	
	        GL11.glPopMatrix();
	
	
	        if(Mouse.isButtonDown(0) && enabled){

After Change


        //super.drawButton(mc, mouse_x, mouse_y);

    	if(visible){
	        GlStateManager.color(1,1,1);
	
	        GlStateManager.pushMatrix();
	
	        //Draw the saturation / brightness square
	        sb_buffer.updateDynamicTexture();
	        this.drawTexturedModalRect(sb_start_x, sb_start_y, 48, 48, 0, 0, 1, 1);
	
	        //Draw the hue square
	        hue_buffer.updateDynamicTexture();
	        this.drawTexturedModalRect(hue_start_x, sb_start_y, 12, 48, 0, 0, 1, 1);
	
	        if(isSwitchOn(ALPHA_SELECTION)){
	            background_buffer.updateDynamicTexture();
	            this.drawTexturedModalRect(alpha_start_x, sb_start_y, 12, 48, 0, 0, 2, 8);
	
	            this.drawGradientRect(alpha_start_x, sb_start_y, alpha_start_x+12, sb_start_y+48, selectedRGB | 0xFF000000, selectedRGB & 0x00FFFFFF);
	        }
	
	        if(isSwitchOn(DEFAULT_COLOURS)){
	            default_colours.updateDynamicTexture();
	            this.drawTexturedModalRect(xPosition, yPosition, 48, 12, 0, 0, 1, 1);
	        }
	
	        if(isSwitchOn(COLOUR_DISPLAY)){
	            background_buffer.updateDynamicTexture();
	            this.drawTexturedModalRect(sb_start_x, sb_start_y+52, 48, 12, 0, 0, 8, 2);
	
	            drawRect(sb_start_x, sb_start_y+52, sb_start_x+48, sb_start_y+64, selectedRGB);
	            GlStateManager.color(1,1,1);
	        }
	
	        GlStateManager.pushMatrix();
	        GlStateManager.color(1,1,1);
	
	        GlStateManager.enableBlend();
	        GlStateManager.blendFunc(GL11.GL_ONE_MINUS_DST_COLOR, GL11.GL_ZERO);
	        //Saturation Line (Horiz)
	        drawRect2(sb_start_x, sb_start_y + (int)((1-selectedHSB[1]) * 48),sb_start_x+48, sb_start_y + (int)((1-selectedHSB[1]) * 48)+1, 0xFFFFFFFF);
	
	        //Brightness Line (Vertical)
	        drawRect2(sb_start_x+ (int)((selectedHSB[2]) * 48), sb_start_y ,sb_start_x+(int)((selectedHSB[2]) * 48)+1, sb_start_y + 48, 0xFFFFFFFF);
	
	        //Hue Line
	        drawRect2(hue_start_x, sb_start_y + (int)(selectedHSB[0] * 48), hue_start_x+12, sb_start_y + (int)(selectedHSB[0] * 48)+1, 0xFFFFFFFF);
	        
	        //Alpha line
	        if(isSwitchOn(ALPHA_SELECTION)){
	        	drawRect2(alpha_start_x, sb_start_y + (int)((1-selected_alpha) * 48), alpha_start_x+12, sb_start_y + (int)((1-selected_alpha) * 48)+1, 0xFFFFFFFF);
	        }
	        
	        GlStateManager.disableBlend();
	        GlStateManager.popMatrix();
	
	        GlStateManager.popMatrix();